-
Notifications
You must be signed in to change notification settings - Fork 294
Inject files into package instead of creating symlinks #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
kichik
commented
Feb 28, 2018
- symlinks are still not working properly on windows (it fails deleting them because they're actually folders)
- IDE indexes the symlinked folders while they're there which slows things down
- any failure, like a file being in use, causes all symlinks to be left behind
- symlinks are still not working properly on windows (it fails deleting them because they're actually folders) - IDE indexes the symlinked folders while they're there which slows things down - any failure, like a file being in use, causes all symlinks to be left behind
serverless#146 already takes care of this, but we need proper noDeploy here again in case a white-listed package is dependent on a black-listed package
Ooh. That's a good idea, I just didn't know how to implement it 😆 Seems to not be working with package individually options tho. I'll review this when i get more time. |
I really have to get my test setup working... That's probably next. It won't even start on Windows 😢 |
Yeah, not sure how you'd run the tests on windows. They should be useable in WSL (or anyother way of getting bash on windows). See over here to install bats: https://github.com/sstephenson/bats |
YES!!! It finally works!! 😀 |
Awesome! You're welcome, its been reaaaallly useful in making it possible for me to accept PRs with confidence that I'm not breaking anything since we use this heavily at @unitedincome (that's the whole reason we wrote it) I'll try to take a close look at this this weekend since it's a bigger change. With this and the addition of package individually, v4 will be a pretty big release 😃 |
Also avoid including __pycache__ where compiled noDeploy packages might remain
it will need to come back once serverless#147 is merged
Could you update this to resolve the conflicts? Thanks. |
Is there anything else I can do to help get this merged? |
Nope, I've just been on vacation thus didn't get around to it 😉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally really looked at the code. looks good baring 1 question about caches
|
||
const relativeFile = path.relative(requirementsPath, file); | ||
|
||
if (relativeFile.match(/^__pycache__[\\\/]/)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why omit caches/pyc? IIRC they're cross platform(just tied to the version of python, which should be the same) and should provide a small perf boost.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just the root __pycache__
which contains mostly six.pyc
that's not deployed by default and maybe other small files. This mimics the old behavior https://github.com/UnitedIncome/serverless-python-requirements/pull/147/files#diff-0ffe4d151b22eb4ec361c9b4faaa9b11L50 and might be improved in the future.
I actually plan on trying to get rid of all .pyc
files in the future with the --no-compile
flag to provide more stable builds (as in building twice produces the exact same result). But there's still some more research to be done there.